package com.example.demo.dao;

import com.example.demo.entity.YG;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface YGRepository extends JpaRepository<YG, Integer> {

    @Query(value = "select * from yg where yno=:yno and  ypw=:ypw", nativeQuery = true)
    YG findByYnoAndYpw(@Param("yno") String yno, @Param("ypw") String ypw);

    @Query(value = "delete from yg where yid=:yid", nativeQuery = true)
    YG deleteByYid(@Param("yid") Integer yid);
}
